package com.example.skincoredemo;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;

import android.os.Bundle;
import android.os.Environment;
import android.view.View;

import java.io.File;

public class SkinActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_skin);
    }


    public void change(View view) {
        String path = Environment.getExternalStorageDirectory() + File.separator + "skin-debug.apk";
        SkinManager.getInstance().loadSkin(path);
        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
    }

    public void restore(View view) {
        SkinManager.getInstance().loadSkin(null);
        AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
    }
}